#ifndef BASE_CTTCPSERVER_H_
#define BASE_CTTCPSERVER_H_
#include "ct_noncopyable.h"
#include <string>

class ctTCPServer:private ctNoncopyable
{
        public:
                ctTCPServer(const std::string &name);
                ~ctTCPServer();
                bool bind(const std::string &name, const unsigned int port);
                int accept(struct sockaddr_in *addr);

        private:
                static const int T_MSEC = 2100;
                static const int MAX_WAITQUEUE = 2000;
                std::string name_;
                int sock_;
                int kdpfd_;
};

#endif //BASE_CTTCPSERVER_H_

